import React from "react"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { useOptions } from "@/hooks"
import { useLocale } from "@/locales"

export default function LockOrderStatus({ rules, disable, labelProps, selectorProps, name }: any) {
	const { formatMessage } = useLocale()

	const options = useOptions({
		modal: "lockStatus",
		func: formatMessage
	})

	return (
		<SFormItem name={name || "lockOrder"} rules={rules} {...labelProps} label={formatMessage({ id: "agent.lock_status" })}>
			<StyleSelect
				placeholder={formatMessage({ id: "label.select_all" })}
				allowClear
				options={options}
				disable={disable}
				{...selectorProps}
			/>
		</SFormItem>
	)
}
